package com.gosophia.metadataEngine.action;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.commons.web.action.BaseAjaxAction;
import com.gosophia.metadataEngine.dto.MetaDataFieldDto;
import com.gosophia.metadataEngine.dto.MetaDataTableDto;
import com.gosophia.metadataEngine.ws.MetadataEngineWebService;
/**
 * 转到相应的元数据展示列表项
 * @author wangxinbing
 * @since 2011-5-6
 */
@Controller("ToMetadataBusinessPageAction")
@Scope("prototype")
public class ToMetadataBusinessPageAction extends BaseAjaxAction<Map<String,Object>> {

	private Long metaDataTableId;
	
	//private List<MetaDataFieldDto> metaDataFieldDtos;
	
	private MetaDataTableDto metaDataTableDto;
	@Autowired
	private MetadataEngineWebService metadataEngineWebService;
	
	public String _execute(){
		metaDataTableDto = metadataEngineWebService.findMetaDataTableById(metaDataTableId);
		//metaDataFieldDtos = metadataEngineWebService.findMetaDataFieldByTableIdListShow(metaDataTableId);
		//page = metadataEngineWebService.findSystemDataSimpleByPage(metaDataTableId, page, searchString, orderConditions, propertyFilters);
		return SUCCESS;
	}
	@Override
	public Map<String,Object> getDetailData() {
		return null;
	}
	public Long getMetaDataTableId() {
		return metaDataTableId;
	}
	public void setMetaDataTableId(Long metaDataTableId) {
		this.metaDataTableId = metaDataTableId;
	}
//	public List<MetaDataFieldDto> getMetaDataFieldDtos() {
//		return metaDataFieldDtos;
//	}
//	public void setMetaDataFieldDtos(List<MetaDataFieldDto> metaDataFieldDtos) {
//		this.metaDataFieldDtos = metaDataFieldDtos;
//	}
	public MetaDataTableDto getMetaDataTableDto() {
		return metaDataTableDto;
	}
	public void setMetaDataTableDto(MetaDataTableDto metaDataTableDto) {
		this.metaDataTableDto = metaDataTableDto;
	}
}
